Phase 1 MVP: Discord auto-archive + trim + manual recall#83
Phase 1 MVP: Discord auto-archive + trim + manual recall#83drpedapati merged 19 commits intomainfrom
Conversation
Deploying sciclaw with
|
| Latest commit: |
4c333d1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8f1924e5.sciclaw.pages.dev |
| Branch Preview URL: | https://feature-discord-memory-phase.sciclaw.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93ebf519fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if err != nil { | ||
| return nil | ||
| } | ||
| safeKey := sanitizeSessionKey(sessionKey) |
There was a problem hiding this comment.
Skip session-key sanitization when recall key is empty
When sessionKey is omitted, sanitizeSessionKey returns "unknown", so the later filename filter treats this as an active key filter and drops almost every archive file. In practice, archive discord recall <query> without --session-key returns no hits even when matching archives exist, which breaks the default/manual recall path.
Useful? React with 👍 / 👎.
| if !strings.HasSuffix(name, ".md") { | ||
| continue | ||
| } | ||
| if safeKey != "" && !strings.Contains(name, safeKey) { |
There was a problem hiding this comment.
Match session archives by exact key token, not substring
Filtering archive files with strings.Contains(name, safeKey) can pull in unrelated sessions whose sanitized keys share prefixes (for example, querying discord:12 also matches discord:123). This contaminates recall results with the wrong conversation history whenever session identifiers overlap.
Useful? React with 👍 / 👎.
|
Update after recall bugfix + release validation:
|
|
Phase 2 update pushed: What’s now in this PR:
Tests added:
Targeted test run passed (archive + phase2 agent-loop tests). |
Summary
Implements the first functional Discord memory slice:
--session-keyis omitted (scan all archives)Commits
Validation
go test ./pkg/archive/discordarchive ./cmd/picoclaw -count=1go test ./pkg/agent -run TestProcessDirectWithChannel_DiscordAutoArchiveTrim -count=1make build-allv0.1.66-dev.2publishedbrew upgrade sciclaw-devsucceedssciclaw --versionshowsv0.1.66-dev.2archive discord listworksarchive discord run --session-key ...archives + trimsarchive discord recall "..."now works both with and without--session-keyNotes